home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / daemons / bootp / bootp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-07-31  |  1.2 KB  |  45 lines

  1. /*
  2.  * Bootstrap Protocol (BOOTP).  RFC 951.
  3.  */
  4.  
  5. struct bootp {
  6.     u_char    bp_op;        /* packet opcode type */
  7. #define    BOOTREQUEST    1
  8. #define    BOOTREPLY    2
  9.     u_char    bp_htype;    /* hardware addr type */
  10.     u_char    bp_hlen;    /* hardware addr length */
  11.     u_char    bp_hops;    /* gateway hops */
  12.     u_long    bp_xid;        /* transaction ID */
  13.     u_short    bp_secs;    /* seconds since boot began */    
  14.     u_short    bp_unused;
  15.     iaddr_t    bp_ciaddr;    /* client IP address */
  16.     iaddr_t    bp_yiaddr;    /* 'your' IP address */
  17.     iaddr_t    bp_siaddr;    /* server IP address */
  18.     iaddr_t    bp_giaddr;    /* gateway IP address */
  19.     u_char    bp_chaddr[16];    /* client hardware address */
  20.     u_char    bp_sname[64];    /* server host name */
  21.     u_char    bp_file[128];    /* boot file name */
  22.     u_char    bp_vend[64];    /* vendor-specific area */
  23. };
  24.  
  25. /*
  26.  * UDP port numbers, server and client.
  27.  */
  28. #define    IPPORT_BOOTPS        67
  29. #define    IPPORT_BOOTPC        68
  30.  
  31. /*
  32.  * "vendor" data permitted for Stanford boot clients.
  33.  */
  34. struct vend {
  35.     u_char    v_magic[4];    /* magic number */
  36.     u_long    v_flags;    /* flags/opcodes, etc. */
  37.     u_char    v_unused[56];    /* currently unused */
  38. };
  39.  
  40. #define    VM_STANFORD    "STAN"    /* v_magic for Stanford */
  41.  
  42. /* v_flags values */
  43. #define    VF_PCBOOT    1    /* an IBMPC or Mac wants environment info */
  44. #define    VF_HELP        2    /* help me, I'm not registered */
  45.